# 前端 Dockerfile - CentOS 7 专用
FROM docker.1ms.run/library/node:25.2.1 AS builder
WORKDIR /app
RUN npm install -g pnpm
COPY package.json package-lock.json  ./
RUN pnpm add dayjs
RUN pnpm install
COPY . .
RUN pnpm run build
FROM nginx:1.24-alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

